Repository navigation
fix(desktop): 为 Codex 子代理卡补上详情空态 - #12330
amanayayatu-tech wants to merge 2 commits into
Conversation
Signed-off-by: Nepha Peachy <amanayayatu@gmail.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Low impact] 本次改动范围明确,未发现阻止合并的问题。
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf7031bc15
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "subagentStarted": "Subagent {{name}} started", | ||
| "showDetails": "Show subagent details", | ||
| "hideDetails": "Hide subagent details", | ||
| "noDetailsAvailable": "No details available.", |
There was a problem hiding this comment.
当用户展开只有状态和计数的 Codex 卡片时,尤其是已经完成的卡片,唯一反馈只是“暂无可展示的详情”,没有说明用户接下来可以做什么。根 AGENTS.md 指定的权威规范 docs/design-rules/DESIGN.md §11.1 明确要求空态指向第一步操作,不能仅说明无数据。请根据现有能力补充可行的结果查看指引或下一步,并同步全部语言;不要承诺尚未实现的正文采集或无依据的重试。
AGENTS.md reference: AGENTS.md:L58-L59
Useful? React with 👍 / 👎.
Signed-off-by: Nepha Peachy <amanayayatu@gmail.com>
这次改了什么
摘要
Codex 的子代理卡有时只收到名称、状态和工具计数。点开后会显示空白。现在展开区会说明「暂无可展示的详情,可查看对话中的回复」,收到任务说明、摘要、最近工具或输出文件时则展示相应内容。
变更类型
fix缺陷修复范围
UI 变化
docs/design-rules/DESIGN.md§4 Desktop chat and operation authorization、§10 Light / Dark Dual-Mode Delivery Gate、§11 Voice & Content、§14.4 Motion & Transitions。使用既有展开区域和语义文本色,沿用现有按钮、焦点和折叠交互。提示使用现有多语言入口。pnpm ui:check --entry tmp/codex-card.tsx --theme all --locale en,zh-CN --viewport 600x320 --compare c5b7e53361 --output artifacts/ui-check/codex-card-review,macOS · Electron 42.11.12(Chromium 148.0.7778.280,与 Cindy 同一渲染内核);真实组件与主题,场景数据,不是登录账号下的完整 Cindybf0ce54522dfentry:light / dark · en / zh-CN · 600×320default:Ad-hoc entryc5b7e53361,同一步骤左右并排default · initial· light · en · 600×320default · initial· light · zh-CN · 600×320default · initial· dark · en · 600×320default · initial· dark · zh-CN · 600×320完整总览(全部场景,自检用):1/1
怎么验证的
自动验证
c5b7e53361。实际点击生产AgentTaskCard的展开按钮,用合成的 Codex V2 spawn 卡片数据重放。修前运行中、完成且无详情的两条断言失败,展开区只有空容器。修后两种状态单次展开均有文案,后续收到真实摘要数据时显示该摘要并移除空态。pnpm --filter desktop exec vitest run src/renderer/components/chat/__tests__/AgentTaskCardSubagentLive.test.tsx src/renderer/__tests__/AgentTaskCard.test.ts --maxWorkers=1,39 项通过。pnpm --filter desktop typecheck、pnpm check:i18n、pnpm check:i18n-glossary、pnpm check:test-hygiene和git diff --check通过。AgentTaskCardSubagentLive.test.tsx测试价值:走实际卡片的展开交互和摘要更新,观察用户可见文字。对应 Issue 12235。现有测试覆盖已启动回执和状态,未点开无详情的卡片。最小输入是一个有 spawn 回执、只有状态和计数的 Codex 卡片。沿用渲染层 jsdom 单测,单文件修前实测 2.71 秒。手工验证
Mac 隔离 Electron 中点开处于完成态的真实卡片,按相同数据对比两次。中文、英文及亮色、暗色的 4 个组合都显示预期差异。评审后的指引在这 4 个组合重新拍摄,全部通过;12 种语言同步更新。
未执行的验证
Windows 真实 Codex 子线程正文采集和重开恢复仍由原 issue 跟进。
风险
风险分类
影响与回滚
提交前检查